package com.sch.study.pattern;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * User: hui_stone
 * Date: 2015/2/20 0020
 * Time: 下午 14:00
 */
public class WaitNoticeDemo {
    public static void main(String[] args) {
        //固定容器大小为10
        BlockingQueue<Food> foods = new LinkedBlockingQueue<Food>(10);
        Thread produce = new Thread(new Produce(foods));
        Thread consume = new Thread(new Consume(foods));
        produce.start();
        consume.start();
    }
}
